Prevent non string in allowedextensions