better input sanitization for alarms methods