When lombok generates a null-check if statement, by default, a java. lang. NullPointerException will be thrown with ‘field name is marked non-null but is null’ as the exception message. … requireNonNull([field name here], “[field name here] is marked non-null but is null”); or com.