Could just write:
if (last_error.message) {
...
}