val1 != null is redundant