check_Xdir function

Internal: check for valid computational direction arguments