null check for min and maxMove