Added null check. Fixed #4 :1234: