check strings for null termination