NullPointerException thrown if parameter of getContacts() is null