Fixes possible NPE in AbDatabase#ab method.