Add position data type and valid position checking