add safety checks

when callbacks were not set NPE's were thrown