Fixed null pointer exception in grantUserRole API