Sonarqube is raising false-positive NPE

I have a code

final Comparator<Attachment> comparator = getComparator(sort);
if (nonNull(comparator)) {

where nonNull is static import to the method:

public static boolean nonNull(final Object o) {
	return o != null;

And Sonarqube raises:
Null pointers should not be dereferenced in line sort(comparator.reversed()); while clearly NPE can not happen there

I expect that nonNull implementation is in the another file than the main code. Unfortunately that’s the current limitation we have for this rule. If you move nonNull in the file, FP should disappear.
This problem can’t be fixed easily, so for now I suggest you to mark issue as FP in SonarQube UI.
Anyway thanks for reporting it.