Add a NULL check in pdf_page_colors.cpp