Validates arguments

This avoid a segfault if you pass `nil` to `hash`

Regards.

cc @csfrancis.
`assert_nothing_raised` is an ActiveSupport extension, the minitest authors think it's not useful enough...