Added null check to setFieldsInitializer implementation