Checking for getBoundingClientRect before execution.

Added checking for getBoundingClientRect method when getting text
element bounds.