StudentProfileCreate: values should be trimmed automatically #2389

Fixes #2389 
Untrimmed values are supposed to fail the validation, so we cannot validate first. Instead, the 'preprocessParameters' function should trim only if not null.