Avoid searching for type when it isn't needed.