Added @SafeVarargs annotation on firstnotNull to suppress warning.