Make sure invalid strings cause an error