Added valid check for users/groups