Check if move is valid