Fixed up a bunch of deprecation warnings from using defined on hash and array values.