reduce instanceof. For #54