Validate keys parameter

Ensure that keys is a hash