Please check Preconditions using com.google.common.base.Preconditions