Handle more errors and replace .empty? with .blank?
Fix spec