Add getName method and nameMatch method to NP class.