TRIM

Removes leading and trailing spaces at the start and end of the string

TRIM (text)

A string or an expression producing a string

Text: the text with leading and trailing spaces removed.

IF TRIM ('Some string ') = 'Some string' THEN ...