Call getBounds only on initialized objects.
Merge pull request #975 from tobytailor/timeline

Fixes #1066