Fixes #19, checking if callbacks exist before executing them