Null Check

Added Null/undefined check for eventName and callback params of on and
once functions.