correct the type checking on the groups POST method