Fix for empty objects in listenTo

When obj is undefined there will be no error now