isvalidCustomer function is added