Optimize has type extensions method