title: Error :- Call to a member function toOptionArray() on a non-object magento
body: <p>I created new payment method in Magento . I got below  error in admin panel . 
  ( Call to a member function toOptionArray() on a non-object). I googled finally I got only  bad solution (code change in core file ) .</p>
  
  <pre><code> I need to fix the issue without change core file code .
     if(is_object($sourceModel)){
      $optionArray = $sourceModel-&gt;toOptionArray($fieldType == 'multiselect');
     } else {
        Mage::log($e-&gt;source_model);
     }
  </code></pre>