Remove a javascript error when a hash has no HTML element associate