Improving parameter parsing to correctly handle nulls