fix : undefined method 'scheme' for nil:NilClass if value is nil