I've changed the check to check for None.