Add red test case
Quick fix
Oops
Catch TypeError
Wip refactoring