Only add parameter to URL if it has a value