PDF generator update

added if statement for null value, and fixed some spelling.