One line fix for nil reference bug

This is a one line fix for a bug causing crashes for me.
The present code is adding an object to an array, without
first checking if the object reference is not nil.
Braces around if stmt

BTW I signed the Square contributor agreement.
Merge pull request #204 from tarekcorp/master

One line fix for nil reference bug
Merge branch 'refs/heads/square-master'