Fix undefined method `length' for nil:NilClass if no missing found