Possible Duplicate:
Method Overloading for NULL parameter
Quick question about "best practices" when coding in Java. I have a class that can be constructed with two different types of objects (a HashMap or a separate class that I call a SearchTerm). I usually have pretty good handlers in the case where the client gives a null argument through the constructor, but if this does happen, the VM collapses and says the argument was ambiguous. (It makes sense, since the null argument could have been referring to either object.)
How are these situations usually dealt with? Is it bad form to allow separate objects as arguments?