Added __attribute__((nonnull)) for methods that expect non-nil values.