Test for primary key by using primary_key method