Modify validate num and realnum to accept not only string but also int/float inputs.

Using numbers module