If you get an exception when checking a datatable item for DBNull, then change your syntax. E.g:
function css_filewrapper($mediatype, $files=array()){
return array(
'files' ⇒ $files,
'mediatype' ⇒ $mediatype,
'encapsulate' ⇒ $mediatype != 'all',
'encapsulationPrefix' ⇒ '@media '.$mediatype
);
}
/**
* Prints the @media encapsulated default styles of DokuWiki
*