Use 'if not' as opposed to 'if == nil'