Only do this when expected is a Hash