Fix #4: Disallow invalid input types