Checks if the ID is valid
bool isValidId(String id) { return id.isNotEmpty && id.trim().isNotEmpty; }