removed unnecessary != nil's