Code: Null checkes. (#1216 and #1221)
Merge pull request #1234 from am11/master

Code: Null checkes (#1216 and #1221)