Fix isComponent type check.