validPrimaryKey is funtional