Added and additional check to see if object has property 'relations'. 

Fixes #37