Make sure None value is not appended to the resulting alerts list