Add checks for encoding and title presence