Fix NPE when returned injected value is null

(if value is null it won't be injected)