i want to check whether the user input is a number if it is continues the code if its not it re-asks until they enter a number
# This progam will simulate a dice with 4, 6 or 12 sides.
import random
def RollTheDice():
    print("Roll The Dice")
    print()
    ValidNumbers = [4,6,12]
    Repeat = True
    while Repeat == True:
        Counter = 0
        NumberOfSides = input("Please select a dice with 4, 6 or 12 sides")
        if not type(NumberOfSides) == int or not int(NumberOfSides) == ValidNumbers:
            print("You have entered an incorrect value")
            NumberOfSides = int(input("Please select a dice with 4, 6 or 12 sides"))
        else:
            print()
            UserScore = random.randint(1,NumberOfSides)
            print("{0} sided dice thrown, score {1}".format (NumberOfSides,UserScore))
            RollAgain = input("Do you want to roll the dice again? ")
            if RollAgain == "No" or RollAgain == "no":
                print("Have a nice day")
                Repeat = False
            else:
                NumberOfSides = int(input("Please select a dice with 4, 6 or 12 sides: "))
 
     
    