Handling null values and text overflow