Fix error for handling both symbols and strings as hash keys
Change error messages and implement new test