Why not do (pseudo code)

if (StringUtil.isEmpty(uploadedFile.getContentType())) {

} else {
}