Added checks if functions exist