Fix NULL intercept return value bug

Fix an error which occurs if argument "intercept" is NULL.