fetch_primary_key implemented with ignoring the base_class instance

Guessing primary key implemented with ignoring the base_class instance. 
There was a bug reported with the previous implementation. 
The problem occurred because Codeigniter creates a instance of the MY_Model base class.

Now before processing further we are checking if it is a valid model or not.