made doctrine conversion optional depending on the parameter default value