test for null, perhaps better, throw if null or empty passed. Seems something is wrong.