Make "as" checks work correctly with strings

Needed to be special cased for PlayScript since there is an implicit
conversion to string from any type.