Use an if comparison instead of NSAssert