Extracted methods from the middleware method `render_as_pdf?`

Simplified the reading of the method `PDFKit::Middleware#render_as_pdf?`