Add @Nullable to alert condition ids, fixes #762

When an alert condition is created the given id is null, as mongodb will
generate one for it.

(cherry picked from commit 36d8383edf99719a85274229e4a5d23f51e19d48)