implemented isPresent() for functions