[utils] Introduce bool_or_none