Switch instanceof with typeof for Object check