Added arrayForKey and dictForKey.

These perform a type-check after the value lookup.