The getID(), getTypeName(), and getParentID() methods can possibly throw a NPE if an empty metadata object is created. Similarly, the get(String) method will throw an exception if a requested key doesn't exist. This is because this.values.get("some-key") returns null and then asString() gets called on it.
These methods should do null checks before calling asString() and return null if the key doesn't exist.