Adding null check for filetype upload.