fixed nil and quotation if statement for view