Formatted checkNotification function