refactoring
Extracted Helpers::separateParameters() and fixed bugs

- when there was same parameter used twice with only one value after the expression, it created notices about undefined index and failed to construct a valid query
- when the parametr values was NULL, the separateParameters ignored it