This is YOUR code as you have written it, right? So the input can be whatever you choose to require it to be.
Nothing stops you from testing the input to determine the class of a variable, and even perhaps acting intelligently on what is passed in.
So what is your question?