Check for valid position of rail