Allow for a selected value when using fromQuery

This change should have little impact as defaults to null which gives the current behaviour.