checking for invalid room name
extract method