bugfix: check for null meta input element

JavaScript error was occurring in line 101 when trying to access the value property on an undefined object. I've put in check for null object as error was causing all other JavaScript after it to break.