add null check in contactController