Syntax-color annotations more robustly to avoid NPE