Handle more invalid argument exceptions

@ayanonagon 

:gift: 4u