check if data is a hash