NoMethodError fix

Fixes #119

Checks to see if the hash is empty instead of raising NoMethodError.