strictly check shell type