ENH : verify that the location is empty before testing for each value

Before, the isLocationEmpty() method was called in CanAddNumber() method.
Since CanAddNumber() is called for values from 1 to boardSize, we were calling it as much times even is the location wasn't empty. Checking before just helps preventing that.