factory method
throws exception if param is set and is not an array