Steve,
Try this:
var locatorDocument = null;
if (aDocumentId && typeof aDocumentId == "object") {
locatorDocument:NotesDocument = database.getDocumentById(aDocumentID[0]);
} else if (aDocumentId && typeof aDocumentId == "string") {
locatorDocument:NotesDocument = database.getDocumentById(aDocumentID);
}
if (locatorDocument) {
locatorDocument.getItemValueString("PhoneNumber");
}