Replace custom extension check with built-in check