checks for invalid selector