Removed "NOT NULL" condition, fixed code indention/flow

Was there a reason for the `NOT NULL` condition?