applied guard against string input