[runtime] Fix a nullref when casting a null object to a complex type when using --debug=casts. Fixes #14552/#14493.