Fixed dynamic casts from Object in playscript.
Don't handle undefined for now.