Check incoming setAttribute values for validity and change them to a default value if invalid (eg. NaNs)