Checking the method's arguments for null.

I used Preconditions.checkNotNull(T reference) from Guava.