Prevent script element from being null.