public String getFormattedName() {
        if (first_name == null) {
            first_name = "";
        }
        if (middle_name == null) {
            middle_name = "";
        }
        if (last_name == null) {
            return "";
        }
        if (last_name.isEmpty()) {
            return "";
        }
        String formatted;
        try {
            if (this.first_name.isEmpty()) {
                if (this.middle_name.isEmpty()) {
                    formatted = last_name;
                } else {
                    formatted = middle_name.concat(" ").concat(last_name);
                }
            } else {
                if (this.middle_name.isEmpty()) {
                    formatted = first_name.concat(" ").concat(last_name);
                } else {
                    formatted = first_name.concat(" ").concat(middle_name).concat(" ").concat(last_name);
                }
            }
            return formatted;
        } catch (Exception e) {
            Logger.getLogger(Contact.class.getName()).log(Level.SEVERE, null, e);
            return "";
        }
    }