Remove unwanted ToElementOrNull and use To<Element> in place of ToElementOrDie

This CL removes the unused definition of ToElementOrNull as all the
occurrences of ToElementOrNull() is already replaced with

This CL uses To<Element> and CHECK() in place of ToElementOrDie() and
removes subsequent definition of ToElementOrDie().

Bug: 891908
Change-Id: I41328a58a8540aa1a981ed3f5609585e92865001
Reviewed-by: Jeremy Roman <>
Commit-Queue: Abhijeet Kandalkar <>
Cr-Commit-Position: refs/heads/master@{#676545}
3 files changed