Add explicit string checks in test