Merged erule-check-atom to erule as a function