Type checking on 'basic.square()' method

`basic.quare()` method should throw an error when input is not a number.