Can we change this if statement to:
if((con.getLastName == null && (lastName == null || lastName.equals(""))) || con.getLastName().equals(lastName))
In case our global contact array has contacts with null last names such as Mom or Dad this would throw a NPE.