prevent throw with typeof