Changed comparison to nil predicate