Make sure timestamp is not undefined.