getTitle: check the input argument