Return nil instead of hash on empty string