Make IsType and Cast not error at compile time when given bad types
Previously these two functions would give compile errors when asked to compare against an Array with a different value type. This makes it easier to write generic code that compares virtual handles.